import request from "../config/axios/service"
//-----数据编号配置
export function getDataSetting() {
  return request({
    url: `/Scada/data-setting`,
    method: "get",
  })
}
export function postDataSetting(data) {
  return request({
    url: `/Scada/data-setting`,
    method: "post",
    data,
  })
}
export function deleteDataSetting(data) {
  return request({
    url: `/Scada/data-setting/${data}`,
    method: "delete",
  })
}
export function putDataSetting(code, data) {
  return request({
    url: `/Scada/data-setting/${code}`,
    method: "put",
    data,
  })
}

//----数据源配置
export function getDataSource() {
  return request({
    url: `/Scada/data-source`,
    method: "get",
  })
}
export function postDataSource(data) {
  return request({
    url: `/Scada/data-source`,
    method: "post",
    data,
  })
}
export function deleteDataSource(data) {
  return request({
    url: `/Scada/data-source/${data}`,
    method: "delete",
  })
}
export function putDataSource(code, data) {
  return request({
    url: `/Scada/data-source/${code}`,
    method: "put",
    data,
  })
}

export function getDataType() {
  return request({
    url: `/Scada/data-source/type`,
    method: "get",
  })
}
export function getSourceType() {
  return request({
    url: `/Scada/data-source`,
    method: "get",
  })
}
